#include "frame.h"

MyFrame::MyFrame(wxString title)
	: wxFrame(NULL, -1, title)
{
	_btn = new wxButton(this, BUTTON_BTN, _T("一个按钮"), wxPoint(30,30), wxSize(50,10));
}

void MyFrame::OnBtnClick(wxCommandEvent &event){
	MyDialog *dlg = new MyDialog(this);
	dlg->SetText("Hello, Dialog.");
	dlg->ShowModal();                 // 模态对话框
}

BEGIN_EVENT_TABLE(MyFrame, wxFrame)
	EVT_BUTTON(BUTTON_BTN, MyFrame::OnBtnClick)
END_EVENT_TABLE()
